{% extends 'base.html' %}
{% load news_filters %}
{% block title %}
    小饭桌
{% endblock %}
{% block header %}
    <link rel="stylesheet" href="{% static '/css/index.css' %}">
    <script src="{% static '/js/index_news.js' %}"></script>
{% endblock %}
{% block main %}
	<div class="main">
		<div class="wrapper">
			<div class="news-wrapper">
				<div class="banner-group" id="banner-group">
					<ul class="banner-ul" id="banner-ul">
						<li><a href="#"><img src="https://static-image.xfz.cn/1523588994_243.jpg" alt=""></a></li>
						<li><a href="#"><img src="https://static-image.xfz.cn/1523504442_455.png" alt=""></a></li>
						<li><a href="#"><img src="https://static-image.xfz.cn/1521444982_469.jpg" alt=""></a></li>
						<li><a href="#"><img src="https://static-image.xfz.cn/1522742329_629.png" alt=""></a></li>
					</ul>
					<span class="arrow left-arrow"> < </span>
					<span class="arrow right-arrow"> > </span>
					<div class="page-control-group">
						<ul class="page-control">
						</ul>
					</div>
				</div>
				<div class="news-outer-group">
					<ul class="list-type">
                        <li class="active"><a href="javascript:void(0)">最新咨询</a></li>
                        {% for category in categories %}
                            <li><a href="#">{{ category.name }}</a></li>
                        {% endfor %}

					</ul>
					<ul class="list-inner-group">
{#						<li>#}
{#							<div class="thumbnail"><a href="#"><img src="http://static-image.xfz.cn/1516169692_914.jpg-website.news.list" alt=""></a></div>#}
{#							<div class="news-group">#}
{#								<p class="title"><a href="#">王健林卖掉进军海外首个项目:17亿售伦敦ONE六成股权</a></p>#}
{#                                <p class="desc">外界关于万达要出售此前在海外投资项目的消息一直不断。</p>#}
{#                                <p class="more">#}
{#                                    <span class="category">深度报道</span>#}
{#                                    <span class="pub-time">1小时前</span>#}
{#                                    <span class="author">知了课堂</span>#}
{#                                </p>#}
{#							</div>#}
{#						</li>#}
{#						<li>#}
{#							<div class="thumbnail"><a href="#"><img src="http://static-image.xfz.cn/1516010894_546.jpg-website.news.list" alt=""></a></div>#}
{#							<div class="news-group">#}
{#								<p class="title"><a href="#">新晋世界首富邸明达先生访美。拜登：欢迎爷爷的到来！</a></p>#}
{#                                <p class="desc">昨日乘坐私人飞机去的。</p>#}
{#                                <p class="more">#}
{#                                    <span class="category">独家报道</span>#}
{#                                    <span class="pub-time">2小时前</span>#}
{#                                    <span class="author">坑你.com</span>#}
{#                                </p>#}
{#							</div>#}
{#						</li>#}
                        {% for news in newses %}
                            <li>
                                <div class="thumbnail"><a href="{% url 'news:news_detail' news_id=news.pk %}"><img src="{{ news.thumbnail }}" alt=""></a></div>
							    <div class="news-group">
								    <p class="title"><a href="{% url 'news:news_detail' news_id=news.pk %}">{{ news.title }}</a></p>
                                    <p class="desc">{{ news.desc }}</p>
                                    <p class="more">
                                        <span class="category">{{ news.category.name }}</span>
                                        <span class="pub-time">{{ news.pub_time | time_since }}</span>
                                        <span class="author">{{ news.author.username }}</span>
                                    </p>
							</div>
                            </li>
                        {% endfor %}

					</ul>
					<div class="load-more-group">
                        {% if not display %}
                            <button class="load-more">查看更多</button>
                        {% endif %}
					</div>
				</div>
			</div>
			<div class="sidebar-wrapper">
				<div class="title-group">
					<span class="title">在线课堂</span>
					<a href="#" class="more">更多</a>
				</div>
				<div class="advertise-group">
					<a href="#"><img src="http://www.xfz.cn/static/build/images/side-gift-banner.png"></a>
				</div>
				<div class="platform-group">
					<div class="title-group">
						<span class="title">关注小饭桌</span>
					</div>
					<div class="focus-group">
						<ul class="left-group">
							<li class="zhihu"><a href="#" target="_blank">知乎小饭桌</a></li>
							<li class="weibo"><a href="#" target="_blank">微博小饭桌</a></li>
							<li class="toutiao"><a href="#" target="_blank">头条小饭桌</a></li>
						</ul>
						<div class="right-group"><p class="desc">dddddd扫码关注微信公众号6666</p></div>
					</div>
				</div>
				<div class="hot-news-group">
					<div class="title-group">
						<span class="title">热门推荐</span>
					</div>
					<ul class="hot-list-group">
						<li>
							<div class="left-group">
								<p class="title">
									<a href="#">王健林卖掉进军海外首个项目:17亿售伦敦ON...</a>
								</p>
								<p class="more">
									<span class="category">深度报道</span>
									<span class="pub-time">1-17 20:20:20</span>
								</p>
							</div>
							<div class="right-group">
								<a href="#"><img src="http://static-image.xfz.cn/1516169692_914.jpg-website.news.list" alt=""></a>
							</div>
						</li>
						<li>
							<div class="left-group">
								<p class="title">
									<a href="#">王健林卖掉进军海外首个项目:17亿售伦敦ON...</a>
								</p>
								<p class="more">
									<span class="category">深度报道</span>
									<span class="pub-time">1-17 20:20:20</span>
								</p>
							</div>
							<div class="right-group">
								<a href="#"><img src="http://static-image.xfz.cn/1516169692_914.jpg-website.news.list" alt=""></a>
							</div>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>

{% endblock %}

